//
//  TuijianCell_b.m
//  网易新闻
//
//  Created by dllo on 15/10/7.
//  Copyright (c) 2015年 Lx. All rights reserved.
//

#import "TuijianCell_b.h"
@interface TuijianCell_b()
@property(nonatomic, retain)UILabel *recReason;
@end
@implementation TuijianCell_b
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.recReason = [[UILabel alloc]init];
        self.recReason.textColor = [UIColor redColor];
        self.recReason.font = [UIFont systemFontOfSize:10];
        [self.background addSubview:self.recReason];
        [self.recReason release];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.background.frame = CGRectMake(12, 12, 350, 130);
    self.img.frame = CGRectMake(15, 10, 105, 70);
    self.title.frame = CGRectMake(130, 30, 205, 45);
    self.source.frame = CGRectMake(15, 105, 100, 15);
    self.recReason.frame = CGRectMake(130, 10, 100, 15);
    self.line.frame = CGRectMake(15, 95, 320, 1);
}

- (void)setMod:(TuijianModel *)mod{
    if (_mod != mod) {
        [_mod release];
        _mod = [mod retain];
    }
    [self setOtherMod:mod];
    self.height = 145;
    if (![mod.recReason isEqualToString:@""]) {
        self.recReason.text = mod.recReason;
    }
}

- (void)dealloc{
    [_recReason release];
    [super dealloc];
}

@end

